#include "include/thread_pool.h"
#include "include/inherit_socket.h"
#include "include/my_log.h"
#include "include/crc32.h"
#include "include/conf_reader.h"
#include "logic_handler/logic_include/file_uploader.h"
#include "logic_handler/logic_include/file_download.h"
thread_pool t_pool;

std::atomic<int> pro_status;

inherit_socket work_socket;

int main()
{
    //日志类
    my_log::get_log_instance();
    //crc32
    CCRC32::GetInstance();
    pro_status=PRO_RUNNING;
    //配置文件读取
    conf_reader::get_conf_reader_instance();

    work_socket.start_this_pro();

    file_uploader::get_instance();  //先初始化一下
    file_downloader::get_instance();
    
    while(1){
        work_socket.doing_epoll_wait();
    }
    work_socket.end_this_pro();
    

    return 0;
}